/**
*	@file    \C\1.cpp
*	@date    2013-10-6 17:20
*	@author  Il'yas Garipov <logirz728@gmail.com>
*
*	The Weight-er
*
*	@version 1.0.1
*
*	@par On input: a single number - n
*	@par If this n can be weighted as described in the task, then we print YES.
*	@par If not, then NO is presented.
*/

#include <stdio.h>
#include <assert.h>

#ifndef NDEBUG
	#define DOUT( toprint ) printf( "\n# " toprint )	//!< Debug output, prints a plain text line preceded by #
	#define DPUT( toput , x ) printf( "\n# " toput , x )//!< Debug put, a DOUT with a single variable inside
	#define DLN											//!< Debug line, doesn't exist in release (with NDEBUG defined)
	#define DPUTCLOSURE	DOUT("=============================================================================");\
						DPUT("FILE: %s", __FILE__ );\
						DPUT("COMPILATION DATE: %s", __DATE__ );\
						DPUT("COMPILATION TIME: %s", __TIME__ )//!< Put a closing statement, complete with datestamp and finename.
#else
	#define DOUT
	#define DPUT
	#define DLN if(0)
	#define DPUTCLOSURE
#endif

int main() {
    DOUT("=======================2007, 1 semester assignment, 1-C=======================\n");
    DOUT("==============================================================================\n");
    DOUT("Please enter a natural number which is tested as described in the task:\n");
    DOUT("> ");

    long long int n = 0;
	int chk = scanf("%lld", &n);
    DLN assert(( "You have entered a single number" , chk == 1 ));

    bool ok = 1;
    while(n) {
        if((n%4) == 2) {
            ok=0;
            break;
        } else
            n = (n+1)/4;
    }


    printf (ok? "YES" : "NO");
    DPUTCLOSURE;

    return 0;
}
